<?php

	class RError
	{
		function fileNotFound($notfounded, $callocation, $linenum)
		{
			return '<div style="color: red">File <strong>'.$notfounded.'</strong> not founded in <strong>'
				.$callocation.'</strong> at line <strong>'.$linenum.'</strong></div>';
		}
		
		function incorrectData($data, $callocation, $linenum)
		{
			return '<div style="color: red">Incorrect data '.var_export($data).' in '.$callocation.' at line '.$linenum.'</div>';
		}
		
		function incorrectDataSize($data, $size, $callocation, $linenum)
		{
			return '<div style="color: red">Incorrect data size '.var_export($data, true).' must be '.$size.' in '.$callocation.' at line '.$linenum.'</div>';
		}
		
		function incorrectQuery($options, $callocation, $linenum)
		{
			return '<div style="color: red">Incorrect query with option: <strong>'.var_export($options, true).'</strong> 
				and raised sql error <strong>'.mysql_error().'</strong> in '.$callocation.' at line '.$linenum.'</div>';
		}
		
		function connectionFailed($options, $callocation, $linenum)
		{
			return '<div style="color: red">Connection failed with options: <strong>'.$options.'</strong>
				and raised sql error <strong>'.mysql_error().'</strong> in '.$callocation.' at line '.$linenum.'</div>';
		}
	}

?>